using Microsoft.AspNetCore.Authorization;
using System;

namespace UwinEducation.API.Attributes
{
    /// <summary>
    /// 权限要求特性
    /// </summary>
    public class RequirePermissionAttribute : AuthorizeAttribute
    {
        /// <summary>
        /// 权限代码列表
        /// </summary>
        public string[] Permissions { get; }

        public string PermissionCode { get; }

        public RequirePermissionAttribute(params string[] permissions)
        {
            Permissions = permissions;
        }

        public RequirePermissionAttribute(string permissionCode)
        {
            PermissionCode = permissionCode;
        }
    }
} 